import * as React from 'react';
import {observer} from 'mobx-react'
import styles from './index.scss';

import Bar from '../../../home/Bar'

interface IProps {
    dataY: number[]// 图表的种类Y
    dataX: string[]// 图表的种类X
    title: string
}

@observer
class Home extends React.Component<IProps> {

    constructor(props) {
        super(props);
    }


    public render() {
        const {dataX, dataY, title} = this.props
        return (
            <div className={styles.left}>
                <div className={styles.title}>{title}</div>
                <div className={styles.EChart}>
                    <Bar dataX={dataX} dataY={dataY} />
                </div>
            </div>
        );
    }
}

export default Home;
